﻿using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;

public class IOSWXTool {
	[DllImport ("__Internal")]
	public static extern void doWeChatPaySDKInit (string appid);

	[DllImport ("__Internal")]
	public static extern void doWeChatPaySDKPayNow (string partnerId, string prepayid, string package, string nonceStr, string timeStamp, string sign);

	public static void RegisterAppID(){
		doWeChatPaySDKInit ("wx63917578c09b0e29");
	}

	public static void IOSWxPay(string partnerId,string prepayId, string nonceStr,string timeStamp, string package, string sign){
		RegisterAppID ();
		doWeChatPaySDKPayNow (partnerId,prepayId,package ,nonceStr,timeStamp,sign);
	}
}
